<script setup>
import HomeUser from '@/views/Home/components/HomeUser.vue';
  // 连接服务器
  // 执行完本语句,客户端就会与服务器进行连接。
  // const localuser = JSON.parse(localStorage.getItem('user'))  //从本地获取token
  // const Authorization = localuser.userInfo.dataOne
  // var ws = new WebSocket('wss://5987g53p36.zicp.fun/websocket/username');
  // ws.onopen = function (evt) {
  //   console.log("websockt连接成功");
  // };
  // 若需要多个回调  实例.addEventListener
  // ws.addEventListener('open', function (event) {
  //  ws.send('Hello Server!');
  // });
</script>
<template>
  <div>
    <el-col :span="7">
      <HomeUser></HomeUser>
    </el-col>
    <el-col :span="16">
      <!-- 三级路由 -->
      <RouterView class="homeinfo" />
    </el-col>


  </div>
</template>


<style lang="scss" scoped>
.homeinfo {
  float: left;
  position: fixed;
  top: 5vw;
  right: 9vw;
}
</style>